import {onMounted, reactive} from "vue";
import axios from "axios";

export default function (){
    let dogs = reactive<string[]>([])

    async function getDog(){
        let result = await axios.get('https://dog.ceo/api/breed/pembroke/images/random');
        dogs.push(result.data.message)
    }

    onMounted(()=>{
        getDog();
    });

    return {dogs,getDog}
}
